/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * StartupCompanyManager2012gameInfo.java
 *
 * Created on 13.01.2012, 10:04:48
 */
package startupcompanymanager2012;

/**
 *
 * @author Matthäus
 */
public class StartupCompanyManager2012gameInfo extends javax.swing.JFrame {

    private static int selected;

    /** Creates new form StartupCompanyManager2012gameInfo */
    public StartupCompanyManager2012gameInfo() {
        initComponents();
        gameName.setText(Core.games.get(selected).getTitle());
        gameGenre.setText(Core.games.get(selected).getGenre());
        gameType.setText(Core.games.get(selected).getType());
        gameFocus.setText(Core.games.get(selected).getFocus());
        gameLang.setText(Core.games.get(selected).getLanguage());
        gamePlatf.setText(Core.games.get(selected).getPlatform());
        gameBugs.setText(Integer.toString(Core.games.get(selected).getBugs()));
        gameCost.setText(Core.nfmt.format(Core.games.get(selected).getPrice()));
        gameLines.setText(Integer.toString(Core.games.get(selected).getCompletedLines()) + "/" + Integer.toString(Core.games.get(selected).getTotalLines()));
        gameDev.setText(Core.games.get(selected).getDevName());
    }

    public static void setSelected(int sel) {
        selected = sel;
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jPanel1 = new javax.swing.JPanel();
        jButton1 = new javax.swing.JButton();
        panelGameName = new javax.swing.JPanel();
        gameName = new javax.swing.JLabel();
        panelMainInfo = new javax.swing.JPanel();
        labelGenre = new javax.swing.JLabel();
        labelType = new javax.swing.JLabel();
        labelFocus = new javax.swing.JLabel();
        labelLang = new javax.swing.JLabel();
        labelPlatf = new javax.swing.JLabel();
        gameGenre = new javax.swing.JLabel();
        gameType = new javax.swing.JLabel();
        gameFocus = new javax.swing.JLabel();
        gameLang = new javax.swing.JLabel();
        gamePlatf = new javax.swing.JLabel();
        panelSideInfo = new javax.swing.JPanel();
        labelCost = new javax.swing.JLabel();
        labelLines = new javax.swing.JLabel();
        labelBugs = new javax.swing.JLabel();
        labelDev = new javax.swing.JLabel();
        gameCost = new javax.swing.JLabel();
        gameLines = new javax.swing.JLabel();
        gameBugs = new javax.swing.JLabel();
        gameDev = new javax.swing.JLabel();

        setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
        org.jdesktop.application.ResourceMap resourceMap = org.jdesktop.application.Application.getInstance(startupcompanymanager2012.StartupCompanyManager2012App.class).getContext().getResourceMap(StartupCompanyManager2012gameInfo.class);
        setTitle(resourceMap.getString("Form.title")); // NOI18N
        setName("Form"); // NOI18N
        setResizable(false);

        jPanel1.setBackground(resourceMap.getColor("jPanel1.background")); // NOI18N
        jPanel1.setName("jPanel1"); // NOI18N

        jButton1.setText(resourceMap.getString("jButton1.text")); // NOI18N
        jButton1.setName("jButton1"); // NOI18N
        jButton1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                closeFrame(evt);
            }
        });

        panelGameName.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
        panelGameName.setName("panelGameName"); // NOI18N

        gameName.setFont(resourceMap.getFont("gameName.font")); // NOI18N
        gameName.setText(resourceMap.getString("gameName.text")); // NOI18N
        gameName.setName("gameName"); // NOI18N

        javax.swing.GroupLayout panelGameNameLayout = new javax.swing.GroupLayout(panelGameName);
        panelGameName.setLayout(panelGameNameLayout);
        panelGameNameLayout.setHorizontalGroup(
            panelGameNameLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(panelGameNameLayout.createSequentialGroup()
                .addGap(79, 79, 79)
                .addComponent(gameName)
                .addContainerGap(112, Short.MAX_VALUE))
        );
        panelGameNameLayout.setVerticalGroup(
            panelGameNameLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(panelGameNameLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(gameName)
                .addContainerGap(12, Short.MAX_VALUE))
        );

        panelMainInfo.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
        panelMainInfo.setName("panelMainInfo"); // NOI18N

        labelGenre.setFont(resourceMap.getFont("labelFocus.font")); // NOI18N
        labelGenre.setText(resourceMap.getString("labelGenre.text")); // NOI18N
        labelGenre.setName("labelGenre"); // NOI18N

        labelType.setFont(resourceMap.getFont("labelFocus.font")); // NOI18N
        labelType.setText(resourceMap.getString("labelType.text")); // NOI18N
        labelType.setName("labelType"); // NOI18N

        labelFocus.setFont(resourceMap.getFont("labelFocus.font")); // NOI18N
        labelFocus.setText(resourceMap.getString("labelFocus.text")); // NOI18N
        labelFocus.setName("labelFocus"); // NOI18N

        labelLang.setFont(resourceMap.getFont("labelFocus.font")); // NOI18N
        labelLang.setText(resourceMap.getString("labelLang.text")); // NOI18N
        labelLang.setName("labelLang"); // NOI18N

        labelPlatf.setFont(resourceMap.getFont("labelFocus.font")); // NOI18N
        labelPlatf.setText(resourceMap.getString("labelPlatf.text")); // NOI18N
        labelPlatf.setName("labelPlatf"); // NOI18N

        gameGenre.setText(resourceMap.getString("gameGenre.text")); // NOI18N
        gameGenre.setName("gameGenre"); // NOI18N

        gameType.setText(resourceMap.getString("gameType.text")); // NOI18N
        gameType.setName("gameType"); // NOI18N

        gameFocus.setText(resourceMap.getString("gameFocus.text")); // NOI18N
        gameFocus.setName("gameFocus"); // NOI18N

        gameLang.setText(resourceMap.getString("gameLang.text")); // NOI18N
        gameLang.setName("gameLang"); // NOI18N

        gamePlatf.setText(resourceMap.getString("gamePlatf.text")); // NOI18N
        gamePlatf.setName("gamePlatf"); // NOI18N

        javax.swing.GroupLayout panelMainInfoLayout = new javax.swing.GroupLayout(panelMainInfo);
        panelMainInfo.setLayout(panelMainInfoLayout);
        panelMainInfoLayout.setHorizontalGroup(
            panelMainInfoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(panelMainInfoLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(panelMainInfoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(panelMainInfoLayout.createSequentialGroup()
                        .addComponent(labelGenre)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(gameGenre))
                    .addGroup(panelMainInfoLayout.createSequentialGroup()
                        .addComponent(labelType)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(gameType))
                    .addGroup(panelMainInfoLayout.createSequentialGroup()
                        .addComponent(labelFocus)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(gameFocus))
                    .addGroup(panelMainInfoLayout.createSequentialGroup()
                        .addComponent(labelLang)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(gameLang))
                    .addGroup(panelMainInfoLayout.createSequentialGroup()
                        .addComponent(labelPlatf)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(gamePlatf)))
                .addContainerGap(136, Short.MAX_VALUE))
        );
        panelMainInfoLayout.setVerticalGroup(
            panelMainInfoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(panelMainInfoLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(panelMainInfoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(labelGenre)
                    .addComponent(gameGenre))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(panelMainInfoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(labelType)
                    .addComponent(gameType))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(panelMainInfoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(labelFocus)
                    .addComponent(gameFocus))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(panelMainInfoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(labelLang)
                    .addComponent(gameLang))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(panelMainInfoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(labelPlatf)
                    .addComponent(gamePlatf))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        panelSideInfo.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
        panelSideInfo.setName("panelSideInfo"); // NOI18N

        labelCost.setFont(resourceMap.getFont("labelDev.font")); // NOI18N
        labelCost.setText(resourceMap.getString("labelCost.text")); // NOI18N
        labelCost.setName("labelCost"); // NOI18N

        labelLines.setFont(resourceMap.getFont("labelDev.font")); // NOI18N
        labelLines.setText(resourceMap.getString("labelLines.text")); // NOI18N
        labelLines.setName("labelLines"); // NOI18N

        labelBugs.setFont(resourceMap.getFont("labelDev.font")); // NOI18N
        labelBugs.setText(resourceMap.getString("labelBugs.text")); // NOI18N
        labelBugs.setName("labelBugs"); // NOI18N

        labelDev.setFont(resourceMap.getFont("labelDev.font")); // NOI18N
        labelDev.setText(resourceMap.getString("labelDev.text")); // NOI18N
        labelDev.setName("labelDev"); // NOI18N

        gameCost.setText(resourceMap.getString("gameCost.text")); // NOI18N
        gameCost.setName("gameCost"); // NOI18N

        gameLines.setText(resourceMap.getString("gameLines.text")); // NOI18N
        gameLines.setName("gameLines"); // NOI18N

        gameBugs.setText(resourceMap.getString("gameBugs.text")); // NOI18N
        gameBugs.setName("gameBugs"); // NOI18N

        gameDev.setText(resourceMap.getString("gameDev.text")); // NOI18N
        gameDev.setName("gameDev"); // NOI18N

        javax.swing.GroupLayout panelSideInfoLayout = new javax.swing.GroupLayout(panelSideInfo);
        panelSideInfo.setLayout(panelSideInfoLayout);
        panelSideInfoLayout.setHorizontalGroup(
            panelSideInfoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(panelSideInfoLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(panelSideInfoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(panelSideInfoLayout.createSequentialGroup()
                        .addComponent(labelCost)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(gameCost))
                    .addGroup(panelSideInfoLayout.createSequentialGroup()
                        .addComponent(labelLines)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(gameLines))
                    .addGroup(panelSideInfoLayout.createSequentialGroup()
                        .addComponent(labelBugs)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(gameBugs))
                    .addGroup(panelSideInfoLayout.createSequentialGroup()
                        .addComponent(labelDev)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(gameDev)))
                .addContainerGap(141, Short.MAX_VALUE))
        );
        panelSideInfoLayout.setVerticalGroup(
            panelSideInfoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(panelSideInfoLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(panelSideInfoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(labelCost)
                    .addComponent(gameCost))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(panelSideInfoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(labelLines)
                    .addComponent(gameLines))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(panelSideInfoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(labelBugs)
                    .addComponent(gameBugs))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(panelSideInfoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(labelDev)
                    .addComponent(gameDev))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
        jPanel1.setLayout(jPanel1Layout);
        jPanel1Layout.setHorizontalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addContainerGap()
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(panelMainInfo, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addComponent(panelGameName, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addComponent(panelSideInfo, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addGap(78, 78, 78)
                        .addComponent(jButton1)))
                .addContainerGap())
        );
        jPanel1Layout.setVerticalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(panelGameName, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(panelMainInfo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(panelSideInfo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jButton1)
                .addContainerGap())
        );

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void closeFrame(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_closeFrame
        dispose();    }//GEN-LAST:event_closeFrame

    /**
     * @param args the command line arguments
     */
    public static void init(String args[]) {
        /* Set the Nimbus look and feel */
        //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
        /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
         * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html 
         */
        try {
            for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
                if ("Nimbus".equals(info.getName())) {
                    javax.swing.UIManager.setLookAndFeel(info.getClassName());
                    break;
                }
            }
        } catch (ClassNotFoundException ex) {
            java.util.logging.Logger.getLogger(StartupCompanyManager2012gameInfo.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (InstantiationException ex) {
            java.util.logging.Logger.getLogger(StartupCompanyManager2012gameInfo.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (IllegalAccessException ex) {
            java.util.logging.Logger.getLogger(StartupCompanyManager2012gameInfo.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (javax.swing.UnsupportedLookAndFeelException ex) {
            java.util.logging.Logger.getLogger(StartupCompanyManager2012gameInfo.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        }
        //</editor-fold>

        /* Create and display the form */
        java.awt.EventQueue.invokeLater(new Runnable() {

            public void run() {
                new StartupCompanyManager2012gameInfo().setVisible(true);
            }
        });
    }
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JLabel gameBugs;
    private javax.swing.JLabel gameCost;
    private javax.swing.JLabel gameDev;
    private javax.swing.JLabel gameFocus;
    private javax.swing.JLabel gameGenre;
    private javax.swing.JLabel gameLang;
    private javax.swing.JLabel gameLines;
    private javax.swing.JLabel gameName;
    private javax.swing.JLabel gamePlatf;
    private javax.swing.JLabel gameType;
    private javax.swing.JButton jButton1;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JLabel labelBugs;
    private javax.swing.JLabel labelCost;
    private javax.swing.JLabel labelDev;
    private javax.swing.JLabel labelFocus;
    private javax.swing.JLabel labelGenre;
    private javax.swing.JLabel labelLang;
    private javax.swing.JLabel labelLines;
    private javax.swing.JLabel labelPlatf;
    private javax.swing.JLabel labelType;
    private javax.swing.JPanel panelGameName;
    private javax.swing.JPanel panelMainInfo;
    private javax.swing.JPanel panelSideInfo;
    // End of variables declaration//GEN-END:variables
}
